package com.jqweb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("article")
public class ArticleEntity {
    @TableId(type = IdType.AUTO)  // 指定ID为数据库自增
    private Integer id;
    private String title; // 标题
    private String content; // 内容
    private Integer manager_id; // 发布者id
    private String manager_name; // 发布者姓名
    // 用于处理JSON
    @TableField(typeHandler = com.jqweb.utils.ListTypeHandler.class)
    private List<String> tags; // 标签
    private String category; // 分类
    private String color; // 颜色
    private LocalDateTime created_time;
}
